package com.hellobike.haxing.modules.wms.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hellobike.haxing.modules.wms.dto.ExportStockBatchLocDto;
import com.hellobike.haxing.modules.wms.dto.StockBatchLocDto;
import com.hellobike.haxing.modules.wms.entity.StockBatchLoc;
import com.baomidou.mybatisplus.extension.service.IService;

import java.math.BigDecimal;
import java.util.List;

/**
 * @Description: t_wms_stock_batch_loc
 * @Author: haxing-boot
 * @Date:   2020-01-09
 * @Version: V1.0
 */
public interface IStockBatchLocService extends IService<StockBatchLoc> {

    StockBatchLoc getBySkuIdAndLocIdAndBatchIdAndWarehouseId(Long skuId, Long locId, Long batchId, Long warehouseId);

    boolean addStock(Long id, BigDecimal qty);

    List<StockBatchLoc> queryStockBySkuIdAndWarehouseId(Long skuId, Long warehouseId);

    boolean subStock(Long id, BigDecimal qty);

    IPage<StockBatchLocDto> pageByStockBatchLocDto(Page<StockBatchLocDto> page, StockBatchLocDto stockBatchLoc);

    List<ExportStockBatchLocDto> exportStockBatchLoc(StockBatchLocDto stockBatchLoc);
}
